1. Field of the Invention
The present invention relates to an apparatus and a method of gamma correction, and more particularly, to an apparatus and a method for applying a gamma curve varied according to a brightness level of a detected image signal to adaptively perform a gamma correction in a digital image processor.
2. Description of the Related Art
Human eyes react non-linearly with respect to brightness according to Weber's law. For this reason, when a relatively limited bit depth such as 8 bits for each channel is provided, linearly encoding the brightness of light causes posterization. Accordingly, in order to achieve high picture quality when an arbitrary bit depth is given, encoding using a non-linear function is needed. As such, encoding information taking into account the nonlinearity of human's eyes is called “gamma correction”. In the case of a conventional digital image processor, when raw data generated by a captured image is image-processed into Joint Photographic coding Experts Group (JPEG) data or Tagged Image File Format (TIFF) data, gamma correction is performed.
FIG. 1 is a block diagram of a gamma correction apparatus included in a conventional digital image processor.
Referring to FIG. 1, 12-bit (also, 10-bit or 16-bit) raw data acquired by a charge-coupled device (CCD) filter (not shown) and a color filter array (CFA) filter (not shown) is digitized by an analog-to-digital converter (ADC) 110.
Components used in the CCD and CFA filters are sensitive to a change in temperature and generate a dark current according to the change in temperature, resulting in an undesired black level being included in an image signal. A black level adjustment unit 115 removes such a black level generated by the dark current.
A gamma correction unit 120 corrects an input brightness level of a 12-bit image signal input by a gamma curve to an 8-bit brightness level, and outputs the 8-bit brightness level. FIG. 2 is a graph illustrating a gamma curve applied when gamma correction is performed by the gamma correction apparatus shown in FIG. 1. For example, a brightness level 1500 of the 12-bit image signal is corrected to a brightness level 200 of an 8-bit image signal by the gamma curve.
A CFA interpolator 125 interpolates a bayer pattern implemented by RGRG lines and GBGB lines of the gamma-corrected 8-bit data into RGB lines. The CFA interpolator 125 performs color interpolation by first restoring G channels from pixels having only R or B channel values, and then filling B and R channel values in empty areas in this order or in an inverse order, thus restoring three channels of R, G, and B.
A YUV converter 130 converts the interpolated RGB signal into a YUV signal.
An edge compensator 135 filters Y signals using a high-pass filter (HPF) so as to enhance the sharpness of images. A first noise removing unit 140 removes noise from the filtered Y signals.
A color corrector 145 corrects color values of U and V signals using a standard color coordinate system. The second noise removing unit 150 removes noise from the U and V signals, the color values of which are corrected.
A Joint Photographic coding Experts Group (JPEG) generator 155 compresses and signal-processes the YUV signals whose noise have been removed, and generates a JPEG file. The JPEG file is stored in a memory (not shown).
However, when the exposure of images photographed by the digital image processor is too long or when there is no signal corresponding to low brightness in a specific scene, performing gamma correction using the gamma curve illustrated in FIG. 2 causes great loss of image data at low brightness along an output brightness level axis as illustrated in FIG. 3, so that stable images cannot be acquired.
Likewise, when there is no signal corresponding to high brightness in photographed images, performing gamma correction using the gamma curve illustrated in FIG. 2 causes great loss of image data at high brightness along the output brightness level axis, so that stable images cannot be acquired.